package com.wxyzz.common.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("article")
public class Article {
    @TableId(type= IdType.AUTO)
    private Integer id;          //文章id
    private Integer uidPublish;  //发布文章的用户id
    private String  label;       //文章标签，属于哪一类
    private String  title;       //文章标题
    private String  content;     //文章内容
    private Integer enshrineNum; //收藏数量
    private Integer likeNum;     //点赞数量
    private String  imgPath;     //图片路径
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date    createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date    updateTime;
}
